<UserControl 
    x:Class="Microsoft.Robotics.Visualization.MessageRateControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:l="clr-namespace:Microsoft.Robotics.Visualization"
             xmlns:r="clr-namespace:Microsoft.Robotics.Runtime"
             mc:Ignorable="d" 
             d:DesignHeight="26" d:DesignWidth="320">
    <StackPanel Orientation="Horizontal" Height="26" VerticalAlignment="Center">
        <TextBlock VerticalAlignment="Center" Text="{Binding Path=SamplesPerSecond, StringFormat=Messages/second: {0:N1}}" Width="140"/>
        <TextBlock VerticalAlignment="Center" Text="{Binding Path=MessageCount, StringFormat=Total messages: {0}}"  Margin="15, 0"/>
        <Button x:Name="Snap" Click="OnSnapButtonClicked" ToolTip="Saves the current message to a file" Width="60" Margin="15, 0">Snap</Button>
        <TextBlock VerticalAlignment="Center" Text=" | "/>
    </StackPanel>
</UserControl>
